<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="ptn" value="######0.0000" />
<c:forEach items="${armItems}" var="aitem" varStatus="statu">
        
    
	
	<tr id='amp${gindex}'
	    class="${aitem.actioned?"success":""}"
	   >
		<td valign="bottom">		
		<input 
		    type="text"
		    name="bean.armItems[${gindex}].host.code" 
		    value="${aitem.host.code}" 
		    class="code-field"
		    readonly />
			
		</td>
		<!-- 从左往右依次为 -->
		<!-- 产品名称 -->
		<td valign="bottom">
		<input 
		    type="text"
		    name="bean.armItems[${gindex}].host.name" 
		    value="${aitem.host.name}" 
		    class="code-field"
		    readonly />
		</td>
		<td valign="bottom">${aitem.dataItems['ForwardStore'].atomValue}</td>
		<td valign="bottom">${aitem.dataItems['ForwardStore'].accumulateValue}</td>
		
		<!-- 本月计划 -->
		
		<td valign="bottom">
		   <span style="color:blue;font-weight:bolder">
		     ${aitem.monthPlan}
		   </span>
		</td>
		
		<!-- 产品本日生产-->
		
		
		
		<fmt:formatNumber var="aav"
			value="${aitem.dataItems['Action'].atomValue}" pattern="${ptn}" />
		<td valign="bottom"><input type="text"
		    class="number-field"
			name="bean.armItems[${gindex}].dataItems['Action'].atomValue"
			value="${aav}" /></td>

		<fmt:formatNumber var="alv"
			value="${aitem.dataItems['Action'].accumulateValue}" pattern="${ptn}" />
		<td valign="bottom"><label>${alv}</label></td>

		<fmt:formatNumber var="pav"
			value="${aitem.dataItems['Passed'].atomValue}" pattern="${ptn}" />
		<!-- 今日验收合格 -->
		<td valign="bottom"><input type="text"
			class="number-field"
			name="bean.armItems[${gindex}].dataItems['Passed'].atomValue"
			value="${pav}" /></td>
		<!-- 截止今日验收累计合格 -->
		<fmt:formatNumber var="plv"
			value="${aitem.dataItems['Passed'].accumulateValue}" pattern="${ptn}" />
		<td valign="bottom"><label>${plv}</label></td>

		<fmt:formatNumber var="wav"
			value="${aitem.dataItems['Waster'].atomValue}" pattern="${ptn}" />
		<td valign="bottom"><input 
		    type="text"
		    class="number-field"
			name="bean.armItems[${gindex}].dataItems['Waster'].atomValue"
			value="${wav}" /></td>

		<fmt:formatNumber var="wlv"
			value="${aitem.dataItems['Waster'].accumulateValue}" 
			pattern="${ptn}" />
		<td valign="bottom"><label>${wlv}</label></td>

		<fmt:formatNumber var="tav"
			value="${aitem.dataItems['Test'].atomValue}" pattern="${ptn}" />
		<td valign="bottom">
		 <input type="text"
			class="number-field"
			name="bean.armItems[${gindex}].dataItems['Test'].atomValue"
			value="${tav}" /></td>

		<fmt:formatNumber var="tlv"
			value="${aitem.dataItems['Test'].accumulateValue}" pattern="${ptn}" />
		<td valign="bottom"><label>${tlv}</label></td>
		<td valign="bottom">${aitem.dataItems['FinalStore'].atomValue}</td>
		<td valign="bottom">
		<input
		    class="number-field remarkTip" 
			name="bean.armItems[${gindex}].remark"
			id="armItems[${gindex}].remark" value="${aitem.remark}" />
		</td>
		<td>
		<c:set var="myType" value="${aitem.itemType}"></c:set>
		<select 
		  class="code-field"
		  name="bean.armItems[${gindex}].itemType">
	       <c:forEach items="${ptypes}" var="pt">
	          <option value="${pt}" ${myType==pt?"selected":""}>${pt}</option>
	       </c:forEach>
		</select>		
				
	    </td>

		<td valign="middle"><img style="cursor: hand"
			src="${sbase}/images/removeme.gif"
			onclick="removeLine(this)" />
				
			</td>

	</tr>
	
	<c:set var="gindex" value="${gindex+1}" scope="request"/>
</c:forEach>